package com.tbit.uqbike.object.pojo;

import com.tbit.uqbike.annos.Excel;
import lombok.Data;

/**
 * 优惠券套餐按天统计导出
 *
 * @Author:BUGTian
 * @DATE: 2022/8/8
 */
@Data
public class UserMealLogByDayExportVO {

    @Excel(name = "日期", sort = 1)
    private String name;
    /**
     * 金额
     */
    private Integer money;
    @Excel(name = "优惠券订单金额（元）", sort = 2)
    private String moneyYuan;
    /**
     * 次数
     */
    @Excel(name = "优惠券订单总数（个）", sort = 3)
    private Integer total;

    /**
     * 导出数据处理
     */
    public void excelDataDeal() {
        if (money == null || money == 0) {
            this.moneyYuan = "0";
            return;
        }
        this.moneyYuan = String.format("%.2f", ((double) money / 100D));
    }
}
